﻿using bleissem.CMWVS.UI.Dialogs;
using CMWVS.Core.Mono;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bleissem.CMWVS.Commands
{
    public class OptionsCommand : BaseCommand
    {
        #region Constructor

        public OptionsCommand()
            : base(new CommandID(GuidList.GuidCMWVS_Plugin_Options, (int)PkgCmdIDList.IDCMWVS_Plugin_Options))
        {
        }

        #endregion Constructor

        protected override void OnBeforeQueryStatus()
        {
            this.Enabled = base.Resolver.Get<MonoConfig>().IsInstalled;

            base.OnBeforeQueryStatus();
        }

        protected override void Execute()
        {
            OptionsWindow optionsWindow = new OptionsWindow();
            optionsWindow.DataContext = new UI.ViewModels.OptionsViewModel(base.Resolver);
            optionsWindow.ShowDialog();
        }
    }
}